package com.study.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the pur_received database table.
 * 
 */
@Entity
@Table(name="pur_received")
@NamedQuery(name="PurReceived.findAll", query="SELECT p FROM PurReceived p")
public class PurReceived implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="received_id")
	private String receivedId;

	@Temporal(TemporalType.DATE)
	private Date acceptancedate;

	private String acceptancener;

	private String consignaddress;

	private String purtype;

	private String remarks;

	private String sourceid;

	private String supplier;

	private String theme;

	//bi-directional many-to-one association to PurReceivDetail
	@OneToMany(mappedBy="purReceived")
	private List<PurReceivDetail> purReceivDetails;

	public PurReceived() {
	}

	public String getReceivedId() {
		return this.receivedId;
	}

	public void setReceivedId(String receivedId) {
		this.receivedId = receivedId;
	}

	public Date getAcceptancedate() {
		return this.acceptancedate;
	}

	public void setAcceptancedate(Date acceptancedate) {
		this.acceptancedate = acceptancedate;
	}

	public String getAcceptancener() {
		return this.acceptancener;
	}

	public void setAcceptancener(String acceptancener) {
		this.acceptancener = acceptancener;
	}

	public String getConsignaddress() {
		return this.consignaddress;
	}

	public void setConsignaddress(String consignaddress) {
		this.consignaddress = consignaddress;
	}

	public String getPurtype() {
		return this.purtype;
	}

	public void setPurtype(String purtype) {
		this.purtype = purtype;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getSourceid() {
		return this.sourceid;
	}

	public void setSourceid(String sourceid) {
		this.sourceid = sourceid;
	}

	public String getSupplier() {
		return this.supplier;
	}

	public void setSupplier(String supplier) {
		this.supplier = supplier;
	}

	public String getTheme() {
		return this.theme;
	}

	public void setTheme(String theme) {
		this.theme = theme;
	}

	public List<PurReceivDetail> getPurReceivDetails() {
		return this.purReceivDetails;
	}

	public void setPurReceivDetails(List<PurReceivDetail> purReceivDetails) {
		this.purReceivDetails = purReceivDetails;
	}

	public PurReceivDetail addPurReceivDetail(PurReceivDetail purReceivDetail) {
		getPurReceivDetails().add(purReceivDetail);
		purReceivDetail.setPurReceived(this);

		return purReceivDetail;
	}

	public PurReceivDetail removePurReceivDetail(PurReceivDetail purReceivDetail) {
		getPurReceivDetails().remove(purReceivDetail);
		purReceivDetail.setPurReceived(null);

		return purReceivDetail;
	}

}